How many real frames have passed since this ROM booted - a plain, always-advancing counter, project-wide (not tied to any instance).
game_frame() -> intint
How many real frames have passed since this ROM booted - a plain, always-advancing counter, project-wide (not tied to any instance). The time source wave is built on; call it directly whenever you want elapsed time in a form nothing else in GBML exposes (frame/frame_count/frame_speed are all sprite animation state, never a clock).
var seconds = game_frame() / 60;About 60 frames pass per real second (the GBA's own fixed refresh rate), so dividing by 60 turns the raw frame count into seconds - the one-line conversion to reach for whenever a project thinks in seconds rather than frames.
Keeps advancing through game_pause(true) and through a room change - it is ambient/engine time, not gameplay time, the same "keeps going through a pause" posture the camera and audio take.
Stored internally as an unsigned 32-bit count and returned as a plain int (GBML has no unsigned type): the return value first reads negative after roughly 414 days of continuous uptime, and the underlying count wraps back to 0 after roughly 828 days. Both are far past any realistic handheld play session - and both are a defined wraparound, never a crash.
Keeps advancing through game_pause(true) and through a room change - it is ambient/engine time, not gameplay time, the same "keeps going through a pause" posture the camera and audio take. About 60 of these pass per real second (the GBA's own fixed refresh rate). Stored internally as an unsigned 32-bit count and returned as int (GBML has no unsigned type): the return value first reads negative after roughly 414 days of continuous uptime, and the underlying count wraps back to 0 after roughly 828 days - both far past any realistic handheld play session, and both a defined wraparound, never a crash.